﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace HotelSoft.HotelManagement_GUI
{
    public partial class frmInfoII : Form
    {
        // Define the CS_DROPSHADOW constant
        private const int CS_DROPSHADOW = 0x00020000;

        // Override the CreateParams property
        protected override CreateParams CreateParams
        {
            get
            {
                CreateParams cp = base.CreateParams;
                cp.ClassStyle |= CS_DROPSHADOW;
                return cp;
            }
        }
        int dem = 0;
        Double temp = 1;
        public frmInfoII()
        {
            InitializeComponent();
        }

        private void frmInfoII_Load(object sender, EventArgs e)
        {
            timer3.Enabled = true;
        }

        private void timer1_Tick(object sender, EventArgs e)
        {
            dem++;
            if (dem == 3)
            {
                this.timer1.Enabled = false;
                this.timer2.Enabled = true;
            }
        }

        private void timer2_Tick(object sender, EventArgs e)
        {
            this.Opacity = this.Opacity - 0.1;
            this.Refresh();
            if (this.Opacity == 0)
            {
                this.Close();
                this.timer2.Enabled = false;
            }
        }

        private void timer3_Tick(object sender, EventArgs e)
        {
            this.Opacity = this.Opacity + 0.1;
            if (this.Opacity == temp)
            {
                timer3.Enabled = false;
                timer1.Enabled = true;
            }
        }
    }
}
